import axios from 'axios'

let instance = axios.create({
    baseURL:'http://localhost:8888',
    timeout:5000

})
// 请求拦截器
instance.interceptors.request.use((config) => {
    console.log("请求拦截器")
    return config 
    
});
instance.interceptors.response.use((res) => {
    console.log("响应拦截")
    return res.data
    
},(error) => {
    console.log("请求错误")
    return new Promise(() => {
    })
})

export default instance;